home *** CD-ROM | disk | FTP | other *** search
/ Inventor Labs: Transportation / InventorLabs - Transportation.iso / pc / builders / media / netacess / url41.dir / 00001_Script_1 next >
Text File  |  1996-08-15  |  3KB  |  123 lines

  1. on TestWindowsWeb
  2.   global TheWeb, SetupName, TheURL, TheUser,ThePassword
  3.   
  4.   set SetupName = "Setup.exe"
  5.   set TheURL = "http://www.hminet.com"
  6.   set TheUser = "Your User Name Here"
  7.   set ThePassword = "Your Password Here"
  8.   
  9.   InitWeb
  10.   OpenURL
  11.   CloseWeb
  12. end
  13.  
  14. on ShowTest
  15.   global TheWeb, SetupName, TheURL, TheUser,ThePassword
  16.   
  17.   set SetupName = "Setup.exe"
  18.   set TheURL = "http://www.hminet.com"
  19.   set TheUser = "Your User Name Here"
  20.   set ThePassword = "Your Password Here"
  21.   
  22.   openXlib "inetobj"
  23.   showXlib
  24.   inetobj(mDescribe)
  25.   InitWeb
  26.   -- put "put TheWeb(mCheckInstall)"
  27.   -- put "put TheWeb(mInstallAccess,SetupName)"
  28.   -- put "put TheWeb(mOpenURL,TheURL,TheUser,ThePassword)"
  29.   
  30. end
  31.  
  32. on InitWeb
  33.   global TheWeb,WebStatus
  34.   
  35.   openXlib "inetobj"
  36.   
  37.   if the machineType = 256 then
  38.     if objectP(TheWeb) then
  39.     else
  40.       set TheWeb = Inetobj(mNew) 
  41.       set WebStatus = TheWeb(mInit)
  42.       -- put WebStatus
  43.       set the text of cast "ErrorReport" to TheWeb(mGetWebError,WebStatus) 
  44.     end if
  45.   end if  
  46. end
  47.  
  48. On InstallWeb
  49.   global TheWeb,WebStatus
  50.   
  51.   if objectP(TheWeb) then
  52.     
  53.     if TheWeb(mCheckInstall) = -1 then
  54.       set WebStatus = TheWeb(mInstallAccess,"Setup.exe")
  55.       set the text of cast "ErrorReport" to TheWeb(mGetWebError,WebStatus)
  56.       
  57.     end if
  58.     
  59.     --
  60.     -- Delay: wait for installation to complete
  61.     --
  62.     repeat while TheWeb(mCheckInstall) = 1
  63.     end repeat
  64.   end if
  65.   
  66. end
  67.  
  68. On OpenURL
  69.   global TheWeb,WebStatus,TheUser,ThePassword
  70.   
  71.   if objectP(TheWeb) then  
  72.     --
  73.     -- Check for current installation
  74.     --
  75.     if TheWeb(mCheckInstall) = -1 then
  76.       set the text of cast "ErrorReport" to TheWeb(mGetWebError,2)
  77.       InstallWeb
  78.     end if
  79.     
  80.     --
  81.     -- Open a connection if appropriate
  82.     --
  83.     
  84.     if TheWeb(mCheckInstall) = 0 then
  85.       set WebStatus = TheWeb(mOpenURL,"http://www.hminet.com",TheUser,ThePassword)
  86.       if WebStatus <> 0 then
  87.         -- put TheWeb(mGetWebError,WebStatus)
  88.         TheWeb(mPostWebError,WebStatus)
  89.       end if
  90.     end if
  91.   else
  92.     set the text of cast "ErrorReport" to "Bad Web object"
  93.   end if
  94.   
  95. end
  96.  
  97.  
  98. On CloseWeb
  99.   global TheWeb
  100.   
  101.   if the machineType = 256 then
  102.     if objectP(TheWeb) then
  103.       TheWeb(mDispose)
  104.     end if
  105.   end if
  106.   
  107.   closeXlib "inetobj"
  108. end
  109.  
  110. On TestErrors
  111.   global TheWeb
  112.   
  113.   if objectP(TheWeb) then
  114.     repeat with errval = 1 to 7
  115.       set anerror = TheWeb(mGetWebError,errval)
  116.       -- put errval,".",anerror
  117.       set the text of cast "ErrorReport" to anerror
  118.       TheWeb(mPostWebError,errval)
  119.     end repeat
  120.   end if
  121.   
  122. end
  123.